package com.blb.zycommunity.mapper;

import com.blb.zycommunity.entity.SysRoleMenu;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 角色和菜单关联表 Mapper 接口
 * </p>
 *
 * @author chenheng
 * @since 2023-11-20
 */
public interface SysRoleMenuMapper extends BaseMapper<SysRoleMenu> {

    /**
     * 根据角色查询菜单id
     * @param roleId
     * @return
     */
    @Select("select menu_id from sys_role_menu where role_id = #{roleId}")
    List<Long> SysRoleMenuRoleId(Long roleId);

}
